/**
 * 
 */
package fr.sinno.wms.batch.model;

import java.io.Serializable;
import java.util.Date;

/**
 * @author aelguezzar
 *
 */
public class ExportedCommand implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String codeDocument;
	private Double numeroLigne; 
	private Double quantite;
	private String dateExport; //ddMMyyHHMMSS
	private Double qteCommandee;
	private String isAlternatif;
	private String codeLot;

	public ExportedCommand() {
		super();
	}

	/**
	 * @param codeDocument
	 * @param numeroLigne
	 * @param quantite
	 * @param dateExport
	 * @param qteCommandee
	 */
	public ExportedCommand(String codeDocument, Double numeroLigne,
			Double quantite, String dateExport, Double qteCommandee) {
		super();
		this.codeDocument = codeDocument;
		this.numeroLigne = numeroLigne;
		this.quantite = quantite;
		this.dateExport = dateExport;
		this.qteCommandee = qteCommandee;
	}

	/**
	 * @return the codeDocument
	 */
	public final String getCodeDocument() {
		return codeDocument;
	}

	/**
	 * @param codeDocument the codeDocument to set
	 */
	public final void setCodeDocument(String codeDocument) {
		this.codeDocument = codeDocument;
	}

	/**
	 * @return the numeroLigne
	 */
	public final Double getNumeroLigne() {
		return numeroLigne;
	}

	/**
	 * @param numeroLigne the numeroLigne to set
	 */
	public final void setNumeroLigne(Double numeroLigne) {
		this.numeroLigne = numeroLigne;
	}

	/**
	 * @return the quantite
	 */
	public final Double getQuantite() {
		return quantite;
	}

	/**
	 * @param quantite the quantite to set
	 */
	public final void setQuantite(Double quantite) {
		this.quantite = quantite;
	}

	/**
	 * @return the dateExport
	 */
	public final String getDateExport() {
		return dateExport;
	}

	/**
	 * @param dateExport the dateExport to set
	 */
	public final void setDateExport(String dateExport) {
		this.dateExport = dateExport;
	}

	/**
	 * @return the qteCommandee
	 */
	public final Double getQteCommandee() {
		return qteCommandee;
	}

	/**
	 * @param qteCommandee the qteCommandee to set
	 */
	public final void setQteCommandee(Double qteCommandee) {
		this.qteCommandee = qteCommandee;
	}

	public String getIsAlternatif() {
		return isAlternatif;
	}

	public void setIsAlternatif(String isAlternatif) {
		this.isAlternatif = isAlternatif;
	}

	/**
	 * @param codeLot the codeLot to set
	 */
	public void setCodeLot(String codeLot) {
		this.codeLot = codeLot;
	}

	/**
	 * @return the codeLot
	 */
	public String getCodeLot() {
		return codeLot;
	}

	@Override
	public boolean equals(Object obj) {
		ExportedCommand exported = (ExportedCommand) obj;
		if (null != this.codeDocument && null != this.getNumeroLigne()
				&& null != exported.getCodeDocument() && null != exported.getNumeroLigne()
				&& this.codeDocument.equalsIgnoreCase(exported.getCodeDocument()) 
				&& this.getNumeroLigne().intValue() == exported.getNumeroLigne().intValue()) {
			return true;
		}
		return false;
	}
}
